package com.zack.util.nlp.tfidf;

/**
 * author: dejian 2017 Sep 28, 2017 1:20:22 PM (could be changed)
 **/
public class TFIDFBean {
    private String docName = "";
    private String term = "";
    // term 在这篇doc里出现的次数
    private Integer termFreqInDoc = 0;
    // term 在整个doc里出现的次数
    private Integer termFreqInCorpus = 0;

    // 一篇文档里每个词在文档出现的次数 / 这篇文档的总词数
    private double tf = 0.0;

    // idf: 整个corpus里，文件总数 / 包含这个词的文件数+1
    private double idf = 0.0;
    // tf-idf = tf * idf
    private double tfidf = 0.0;

    public String getDocName() {
        return docName;
    }

    public void setDocName(String docName) {
        this.docName = docName;
    }

    public String getTerm() {
        return term;
    }

    public void setTerm(String term) {
        this.term = term;
    }

    public Integer getTermFreqInDoc() {
        return termFreqInDoc;
    }

    public void setTermFreqInDoc(Integer termFreqInDoc) {
        this.termFreqInDoc = termFreqInDoc;
    }

    public Integer getTermFreqInCorpus() {
        return termFreqInCorpus;
    }

    public void setTermFreqInCorpus(Integer termFreqInCorpus) {
        this.termFreqInCorpus = termFreqInCorpus;
    }

    public double getTf() {
        return tf;
    }

    public void setTf(double tf) {
        this.tf = tf;
    }

    public double getIdf() {
        return idf;
    }

    public void setIdf(double idf) {
        this.idf = idf;
    }

    public double getTfidf() {
        return tfidf;
    }

    public void setTfidf(double tfidf) {
        this.tfidf = tfidf;
    }

}
